home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 616 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.2 KB

  1. Path: tbj.dec.com!diamond
  2. From: diamond@tbj.dec.com (Norman Diamond)
  3. Newsgroups: gnu.misc.discuss,comp.std.c
  4. Subject: Re: Coding Standards are ignorant
  5. Date: 21 Mar 1996 03:51:32 GMT
  6. Organization: Digital Equipment Corporation Japan , Tokyo
  7. Message-ID: <4iqjo4$2c2@usenet.pa.dec.com>
  8. References: <4gum82$14v4@info4.rus.uni-stuttgart.de>  <MIB.96Mar15170902@gnu.ai.mit.edu> <wyraut5fqq.fsf@dns.bluesky.net>  <MIB.96Mar16174948@gnu.ai.mit.edu> <4ifq40$i87@sundog.tiac.net>  <MIB.96Mar18105957@gnu.ai.mit.edu>  <314db547.242588844@nntp.ix.netcom.com> <MIB.96Mar19105603@gnu.ai.mit.edu>
  9. Reply-To: diamond@tbj.dec.com (Norman Diamond)
  10. NNTP-Posting-Host: jit533.tbj.dec.com
  11.  
  12. In article <MIB.96Mar19105603@gnu.ai.mit.edu>, mib@gnu.ai.mit.edu (Michael I. Bushnell, p/BSG) writes:
  13. >In article <314db547.242588844@nntp.ix.netcom.com> miker3@ix.netcom.com (Mike Rubenstein) writes:
  14. >>You most certainly are guarantteed that long is the widest signed integral
  15. >>type and unsigned long is the widest unsigned integral type by ISO 6.1.2.5.
  16. [Caveat on sloppy wording in the standard which will probably be fixed.]
  17.  
  18. >It appears you are correct.  Then the flaw is that you are prohibited
  19. >from using more than four widths of integers.  That's a mistake, which
  20. >we will all rue when the first 128 bit machines come out.  ;-)
  21.  
  22. Actually one famous mistake is already known with 64 bit machines.
  23. 8-bit char, 16-bit short, 32-bit int, 64-bit long is technically valid
  24. but it is weird for int to have a different size from both short and long.
  25.  
  26. Another mistake was already known at the time of K&R-1, when there was
  27. only one size for char but one of their cited implementations was on a
  28. machine which had two sizes for char (either 6 or 9 bits).
  29.  
  30. Another mistake has been known for a couple of decades, making char the
  31. unit size for most C operations when characters actually require 16 or
  32. 32 bits (or varying numbers of bits in some encoding schemes) while the
  33. most popular unit size is 8 bits.
  34. --
  35.  <<  If this were the company's opinion, I would not be allowed to post it.  >>
  36. "I paid money for this car, I pay taxes for vehicle registration and a driver's
  37. license, so I can drive in any lane I want, and no innocent victim gets to call
  38. the cops just 'cause the lane's not goin' the same direction as me" - J Spammer
  39.